<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>考试题3</title>
</head>

<body>
    <!-- 题目3 -->
    <script>

        let p = new Promise((resolve, reject) => {
            resolve(1000)
        })

        let p2 = new Promise((resolve, reject) => {
            reject(1000)
        })

        const theFn = async () => {
            const res = await p
            console.log(res);
            const res2 = await p2
            console.log(res2)
        }
        theFn()
        
    </script>
</body>

</html>